<template>
  <el-form ref="form" :model="form" label-width="80px">
    <el-form-item label="文章标题">
      <el-input v-model="form.title"></el-input>
    </el-form-item>
    <el-form-item label="文章摘要">
      <el-input v-model="form.abstract"></el-input>
    </el-form-item>
    <el-form-item label="文章分类">
      <el-select v-model="form.region" placeholder="请选择活动区域">
        <el-option label="转载" value="shanghai"></el-option>
        <el-option label="原创" value="beijing"></el-option>
      </el-select>
    </el-form-item>
    <el-form-item label="文章状态">
      <el-switch v-model="form.delivery"></el-switch>
    </el-form-item>
    <el-form-item label="文章标签">
      <el-checkbox-group v-model="form.type">
        <el-checkbox label="javascript" name="type"></el-checkbox>
        <el-checkbox label="html" name="type"></el-checkbox>
        <el-checkbox label="css" name="type"></el-checkbox>
        <el-checkbox label="html" name="type"></el-checkbox>
        <el-checkbox label="vue" name="type"></el-checkbox>
        <el-checkbox label="golang" name="type"></el-checkbox>
        <el-checkbox label="mysql" name="type"></el-checkbox>
        <el-checkbox label="redis" name="type"></el-checkbox>
        <el-checkbox label="rabbitmq" name="type"></el-checkbox>
        <el-checkbox label="ubuntu" name="type"></el-checkbox>
      </el-checkbox-group>
    </el-form-item>
    <el-form-item label="活动形式">
      <el-input type="textarea" :rows="6" v-model="form.desc" heght="400"></el-input>
    </el-form-item>
    <el-form-item>
      <el-button type="primary" @click="onSubmit">发布</el-button>
      <el-button>取消</el-button>
    </el-form-item>
  </el-form>
</template>
<script>
export default {
  data() {
    return {
      form: {
        title: "",
        abstract: "",
        region: "",
        date1: "",
        date2: "",
        delivery: false,
        type: [],
        resource: "",
        desc: "",
      },
    };
  },
  methods: {
    onSubmit() {
      console.log("submit!");
    },
  },
};
</script>
